import http from "@/api";
import { Coupon } from "@/api/interface/city/cityMarket/coupon";
// 卡卷管理
// 列表
export const getCouponListAPI = (params: Coupon.SearchParams) => {
  return http.get<Coupon.Row[]>("/manager/coupon/list", params);
};
// 新增
export const addCouponAPI = (data: Coupon.EditParams) => {
  return http.post("/manager/coupon", data);
};
// 修改
export const updateCouponAPI = (data: Coupon.EditParams) => {
  return http.put("/manager/coupon", data);
};
// 获取详情
export const getCouponDetailAPI = (id: string) => {
  return http.get<Coupon.EditParams>(`/manager/coupon/${id}`);
};
// 获取动态记录
export const getCouponRecordAPI = (id: string) => {
  return http.get<Coupon.Record[]>(`/manager/coupon/recordList/${id}`);
};
// 删除
export const deleteCouponAPI = (id: string) => {
  return http.delete(`/manager/coupon/${id}`);
};
